﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Glyphica
{
    class MapTile
    {
        public MapTile(MapTile.TileType type)
        {
            this.Type = type;
            this.IsVisible = true;
        }
        
        public TileType Type;
        public bool IsVisible;              // Can this tile be seen?

        public bool IsPassable()            
        {
            // Can this tile be entered?
            // Most tile types ARE passable, so we only code for the ones that are NOT.
            bool rv = true;
            switch (this.Type)
            {
                case TileType.Door_Closed: rv = false; break;
                case TileType.Door_Locked: rv = false; break;
                case TileType.Stone: rv = false; break;
                case TileType.Stone_NeverVisible: rv = false; break;
            }
            return rv;
        }
        
        public enum TileType
        {
            Stone,
            Stone_NeverVisible,
            Empty,
            Door_Closed,
            Door_Open,
            Door_Locked,
            Stairs_Down,
            Stairs_Up
        }
    }
}
